Voltage region sensing for maximum system power

ABSTRACT

Circuits, methods, and apparatus that may determine one or more characteristics relating to a mains power supply received by a computer system, and may then determine a maximum amount of power that may be drawn by the computer system given the determined characteristics. An example may provide a computer system having a power supply circuit that may include a detection circuit to receive a mains power supply and to detect a characteristic of the mains power supply. In response to the detected characteristic, the detection circuit may provide an output to a circuit in the computer system that sets a limit on a current that may be drawn by the circuit. In this example, the characteristic may be an RMS value of the mains power supply waveform, a location of where the mains power supply is being received, a quality of the mains power supply, or other characteristic.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a nonprovisional of U.S. provisional patentapplication number 62/670,625, filed May 11, 2018, which areincorporated by reference.

BACKGROUND

High-performance computer systems may consume substantial amounts ofpower during computationally intensive periods. Delivering more power inthese situations may decrease processing time and increase efficiency.For maximum performance during these periods, it may be desirable toallow the computer systems to draw the maximum of amount of power thatmay be safely delivered. Thus, what is needed are circuits, methods, andapparatus that may determine a maximum amount of power that may besafely drawn by a computer system.

SUMMARY

Accordingly, embodiments of the present invention may provide circuits,methods, and apparatus that may determine one or more characteristicsrelating to a mains power supply received by a computer system, and thenmay determine a maximum power or current that may be safely drawn by thecomputer system given the determined characteristics. These embodimentsof the present invention may then limit the power or current drawn bythe computer system such that the maximum power or current is notexceeded.

An illustrative embodiment of the present invention may provide acomputer system having a power supply circuit. The power supply circuitmay include a zone detection circuit to receive a mains power supply andto detect a characteristic of the mains power supply. In response to thedetected characteristic, the zone detection circuit may determine amaximum power or current that may be safely drawn by the computersystem. The zone detection circuit may then provide one or more outputsto circuits or components in the computer system, where the outputsprevent the maximum power or current from being exceeded.

Different countries and regions may have regulations or building codesthat specify an amount of power or current that may be drawn from amains power supply. A building code may specify that an outlet in aparticular setting, for example a residence or a business, must be ableto safely provide a specific amount of power or current. The amount ofpower or current that a residential outlet must provide is usually lowerthan what is specified for other types of outlets in a particularcountry or region. To ensure proper operation throughout the particularcountry or region, these and other embodiments of the present inventionmay be designed to operate according to code when receiving a mainspower supply from a residential outlet. Accordingly, these and otherembodiments of the present invention may determine one or morecharacteristics of a mains power supply, where the one or morecharacteristics are indicative of, or a proxy for, the identity of thecountry or region where the mains power supply is being provided. Inthese and other embodiments of the present invention, the identity ofthe actual country or region where the mains power supply is beingprovided may be determined.

In these and other embodiments of the present invention, acharacteristic may be the amplitude of the mains power supply voltage.Specifically, embodiments of the present invention may determine anamplitude of the voltage waveform of the mains power supply, for examplethe root mean square (RMS) value of the mains power supply waveform. Themains power supply may be received by an RMS measurement circuit thatmay determine the RMS value of the mains power supply voltage.

This RMS value may be determined in various ways. For example, the RMSvalue may be determined by measuring a peak voltage of the mains powersupply, then multiplying the measured peak voltage by the reciprocal ofthe square root of two (which is approximately 0.7071.) In these andother embodiments of the present invention, the RMS value may bedetermined by measuring a peak-to-peak voltage of the mains powersupply, then multiplying the measured peak-to-peak voltage by thereciprocal of two times the square root of two (which is approximately0.3536.) In these and other embodiments of the present invention, theRMS value may be determined by rectifying the mains power supply,measuring an average value of the rectified mains power supply, thenmultiplying the measured average by pi divided by the product of twotimes the square root of two (which is approximately 1.11.) In these andother embodiments of the present invention, one or more of thesedifferent techniques may be employed.

In these and other embodiments of the present invention, acharacteristic may be the geographic location of the mains power supply,or more accurately, the geographic location of the computer systemreceiving the mains power supply. Specifically, embodiments of thepresent invention may incorporate a global-positioning system (GPS) thatmay be used to determine the country or region in which the mains powersupply is being provided. For example, a computer system may receive amains power supply and may power a GPS using that power supply. The GPSmay then determine the geographic location where the mains power supplyis being provided, or where the computer system receiving the mainspower supply is located. In these and other embodiments of the presentinvention, the geographic location, or the actual identity of thecountry or region, where the mains power supply is being provided may bedetermined by asking a user or by retrieving geographic locationinformation from a second device, such as a smartphone or other portablecomputing device. In these and other embodiments of the presentinvention, other methods, such as using local cellular service, Wi-Fimapping, or broadcast signals, may be used in determining the geographiclocation. In these and other embodiments of the present invention, oneor more of these and other techniques may be combined or used asverification of each other. For example, an RMS measurement may be usedas a primary indicator, while a GPS measurement, an indication from asecond device, local cellular service, Wi-Fi mapping, or broadcastsignals may be used as confirmation. In the event that different sourcesprovide different results, the computer system may be limited to drawingthe lowest power or current level of the power or current levelsindicated by the results, though the computer system may instead belimited to a lowest power or current level.

After the RMS value, geographic location, or other characteristic of themains power supply has been found, a maximum amount of power or currentthat may be drawn from the mains power supply may be determined. Inthese and other embodiments of the present invention the maximum amountof power or current that may be drawn from the mains power supply may bedetermined by a zone detection circuit with various levels ofspecificity. For example, a country or region may have a relatively lowvalue for the power or current that may be drawn from a mains powersupply. Accordingly, an embodiment of the present invention maydetermine whether the mains power supply is being provided in thatcountry or region. If it is, then the maximum power or current draw maybe set to the limits provided by that country or region. If the mainspower supply is provided in another country or region, a higher valuemay be used as a limit for the maximum power or current draw.

In another example, a country or region may have a relatively low valuefor the power or current that may be drawn from a mains power supply,another may have an intermediate value, while another may have arelatively high value. Accordingly, an embodiment of the presentinvention may determine whether the mains power supply is being providedin a country or region having the lower value, the intermediate value,or the higher value. If it is in a country or region having the lowervalue, then the maximum power or current draw may be set to a lowerlimit, if it is in a country or region having the intermediate value,the maximum power or current draw may be set to an intermediate limit,while if it is in a country or region having a higher value, the maximumpower or current draw may be set to a higher limit. In another example,a high value of a maximum power or current draw may be permitted incountries having a mains power supply in the 220 volt range, while alower value of power or current may be permitted in a country having amains power supply in the 110 volt range. These and other embodiments ofthe present invention may determine a maximum power or current draw withan even greater specificity.

In these and other embodiments of the present the actual region orcountry might not be determined, rather a characteristic may provide aproxy or an indication of the region or country. For example, when thecharacteristic is an RMS value, the zone detection circuit may determinewhether the RMS value is above or below a certain level, or whether theRMS value is within one of a number of ranges. Based on the result, amaximum power or current draw may be determined. When the characteristicis geographic location, the zone detection circuit may include look-uptables to receive a geographic location and provide a maximum power orcurrent that may be drawn. In these and other embodiments of the presentinvention, the zone detection circuit may access information storedexternally, for example over the internet.

In these and other embodiments of the present invention, when thelocation of a mains power supply is uncertain, the computer system maydefault to drawing the lowest, or a lower, power or current level. Inthese and other embodiments of the present invention, when an RMS valueof the mains supply is uncertain, the computer system may default todrawing the lowest, or a lower, power or current level. These and otherembodiments of the present invention may include a quality measurementcircuit to measure the quality of a received mains power supply. Forexample, the consistency of an RMS measurement over several samples maybe determined. Also, the consistency among results where different typesof RMS measurements are made may be determined. If the presence ofamplitude or phase noise or power supply variation results ininconsistent measurements of an RMS voltage, the computer system maydefault to drawing the lowest, or a lower, power or current level.

When a mains power supply is used to power a computer system, currentmay flow through power conduits, an outlet or socket, a power cord intothe computer system, and wired connections in the computer system. Eachof the elements of this path may have a resistance. The current flowingthrough these resistances and into the computer system may createvoltage drops. These voltage drops may reduce an amplitude of thereceived mains power supply voltage, making RMS measurements inaccurate.Also, changes in the current may cause noise on the received mains powersupply voltage, thereby reducing the apparent quality of the mains powersupply. Accordingly, embodiments of the present invention may provide anauxiliary power supply. This auxiliary power supply may provide power toan RMS measurement circuit, a zone detection circuit, and a qualitymeasurement circuit, if present. Power for a central processing unit(CPU), graphics processing units (GPUs), and other circuits orcomponents of the computer system may be withheld until the maximumpower or current that may be drawn is determined. Once a power profileincluding the maximum power or current has been generated, a main powersupply may be activated and power may be delivered to other circuits andcomponents in the computer system. Measuring an RMS value of the mainspower supply voltage when the computer system is at least partiallyunpowered may reduce these ground drops and may improve the RMSmeasurements.

In these and other embodiments of the present invention, an RMS value orgeographic location of the mains power supply may be determined atvarious times. For example, RMS measurements may be made on power-up, orwhen various reset events occur. Geographic locations may be determinedon power up, or when various reset events occur. In these and otherembodiments of the present invention, RMS measurements may be performedin real-time, or on a near real-time basis, while the maximum power orcurrent draw may be updated continuously, or on an occasional or regularbasis. In these and other embodiments of the present invention, RMS andquality measurements may be performed in real-time, or in a nearreal-time basis, while the maximum power or current draw may be updatedcontinuously or on an occasional or regular basis.

Once the maximum power or current draw is determined, the power orcurrent draw of the computer system may be limited in various ways suchthat the maximum power or current draw is not exceeded. For example, aregulated power supply voltage provided to one or more circuits andcomponents in the computer system may be varied to adjust the computersystem power or current draw. In these and other embodiments of thepresent invention, a frequency of a clock signal provided to one or morecircuits may be varied to adjust the power or current draw. In these andother embodiments of the present invention, one or more outputs may beprovided to one or more circuits and components in the computer system.For example, power sink limits (P-limits), may be provided to one ormore circuits and components in the computer system. These outputs orP-limits may set a P-state of the one or more circuits and components.These P-limits may adjust power supply voltages and clock frequenciesprovided to one or more circuits or components. These P-limits may alsocause the insertion of wait or interrupt states that may be used toadjust the power or current draw of one or more circuits or components.In these and other embodiments of the present invention, one or morecircuits or components may be fully or partially disabled in order toensure that the maximum power or current draw is not exceeded. Forexample, they may be disabled using P-limits, by setting a state of oneor more enable signals, by disconnecting or reducing one or more powersupply voltages, by disabling one or more clock signals, by varying oneor more of these or other signals or voltages provided to the one ormore components, or by using other techniques. The disabled circuits orcomponents may be non-critical or redundant circuits or components. Thecircuits and components may include one or more central processingunits, graphics processing units, or other circuits or components.

These and other embodiments of the present invention may provide powersupply circuitry and apparatus that may be located in various types ofdevices, such as desktop computing devices, computing systems, servers,modular computing devices, all-in-one computers, and other devices.

Various embodiments of the present invention may incorporate one or moreof these and the other features described herein. A better understandingof the nature and advantages of the present invention may be gained byreference to the following detailed description and the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart illustrating the operation of a power supplycircuit according to an embodiment of the present invention;

FIG. 2 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention;

FIG. 3 is a flowchart illustrating the operation of another power supplycircuit according to an embodiment of the present invention;

FIG. 4 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention;

FIG. 5 is a flowchart illustrating the operation of another power supplycircuit according to an embodiment of the present invention;

FIG. 6 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention;

FIG. 7 is a flowchart illustrating the operation of another power supplycircuit according to an embodiment of the present invention;

FIG. 8 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention; and

FIG. 9 is a block diagram of computer system according to an embodimentof the present invention.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Computer systems may receive power from a mains power supply through awall outlet or other power connection. The performance of these computersystems may be improved by operating components in the computer systemat a higher clock rate, higher supply voltage, or by varying otherparameters. This may increase an amount of power or current drawn fromthe mains power supply. Accordingly, it may be desirable to for acomputer system to draw as much power or current from a mains powersupply as may be safely delivered.

The amount of power or current that may be safely delivered may bedetermined from one or more characteristics of the mains power supply.Accordingly, embodiments of the present invention may provide circuits,methods, and apparatus that may determine one or more characteristics ofa mains power supply provided to a computer system. From these one ormore characteristics, a maximum amount of power or current that may besafely drawn may be determined. These embodiments may then limit anamount of power or current drawn by the computer system such that thismaximum is not exceeded.

Different countries and regions may have regulations or building codesthat specify the amount of power or current that may be drawn from themains power supply. A building code may specify that an outlet in aparticular setting, for example a residence or a business, must be ableto safely provide a specific amount of power or current. The amount ofpower or current that a residential outlet must provide is usually lowerthat what is specified for other types of outlets in a particularcountry or region. To ensure proper operation throughout the particularcountry or region, these and other embodiments of the present inventionmay be designed to operate properly when receiving a mains power supplyfrom a residential outlet. The mains power supplies may includecircuit-breakers, fuses, or other protective devices or circuits thatmay trip or shut power off to ensure that the amount of power or currentspecified by the building code is not exceeded. Accordingly, these andother embodiments of the present invention may determine acharacteristic of the mains power supply, where the characteristic isindicative of, or a proxy for, the identity of the country or regionwhere the mains power supply is being provided to the computer system(though the actual identity may be used in these and other embodimentsof the present invention.) Once this characteristic is known, power orcurrent drawn by the computer system may be limited to an appropriatemaximum value such that a circuit breaker or other protective componentis not tripped. An example is shown in the following figure.

FIG. 1 is a flowchart illustrating the operation of a power supplycircuit according to an embodiment of the present invention. Thisfigure, as with the other included figures, is shown for illustrativepurposes and does not limit either the possible embodiments of thepresent invention or the claims.

A mains power supply voltage may be received from a mains power supplyin act 110. The mains power supply voltage may be received from a walloutlet, such as a residential outlet, or other power connection. Themains power supply voltage may be received by a power supply circuit orother type of circuit, which may be located in a computer system orother electronic device. In act 120, a characteristic of the mains powersupply may be determined, where the characteristic is a proxy for theidentity of the country or region where the mains power supply is beingprovided (or where the power supply circuit is located, though these maytypically be the same.) This determination may be made, or received by,circuitry in or associated with the power supply circuit. This powersupply region may be a geographical, political, or other type of region,country, or territory. In act 130, a maximum power or current that maybe drawn from the mains power supply may be determined based on thedetermined characteristic. In act 140, output signals, such as powersupply limits, clock signals, or other output signals may be provided toone or more circuits or components in the computer system. These outputsmay be based on the maximum current draw and may control or adjust thepower or current drawn by the computer system such that the maximum isnot exceeded. These one or more circuits or components may includecentral processing units, graphics processing units, and other circuitsor components.

FIG. 2 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention. In this example, power may bereceived from a mains power supply via a wall outlet, such as aresidential outlet, or other connection at input VIN. The voltage VINmay be inductively coupled by transformer inductors L1 and L2 andprovided to a diode bridge that includes diodes D1-D4. The diode bridgeD1-D4 may rectify the received power supply signal. The rectifiedvoltage may be filtered by a capacitor or filter network, shown here asC1, resulting in a DC voltage V2. The voltage V2 may be received bypower supply control 220 in power supply circuit 210. Power supplycontrol 220 may control power regulator 230, which may provide an outputvoltage to other circuits or components (shown in FIG. 9) in a computersystem or other electronic device housing power supply circuit 210.

The mains power supply voltage VIN may be received by zone detectioncircuit 240 in power supply circuit 210. Zone detection circuit 240 maydetermine one or more characteristics of the mains power supply VIN, andfrom that determination may provide one or more outputs, such as powersink limits or P-limits, to other circuits or components in the computersystem. These P-limits or other outputs may adjust or control the poweror current drawn by the circuits or components such that a maximum poweror current is not exceeded. The circuits and components may include oneor more central processing units, graphics processing units, or othercircuits or components (as shown in FIG. 9.) In these and otherembodiments of the present invention, zone detection circuit 240 mayreceive the voltage V1 on the secondary side of the transformer L1-L2,it may receive V2, or it may receive a different voltage.

In these and other embodiments of the present invention, power supplycontrol 220, power regulator 230, zone detection circuit 240, and theother circuits described here or shown in power supply circuit 210 maybe implemented using analog components, analog circuits, digital orlogic circuits, software, firmware, or a combination thereof. Forexample, zone detection circuit 240 may be implemented using acombination of analog and digital circuitry. RMS measurement circuit 410(shown below in FIG. 4), GPS 610 (shown in below FIG. 6), and qualitymeasurement circuit 810 (shown in below FIG. 8), and other circuits inthese and other embodiments of the present invention, may be implementedusing analog components, analog circuits, digital or logic circuits,software, firmware, or a combination thereof.

In these and other embodiments of the present invention, a specificdetermination of a particular country or region might not be necessary.Instead, one or more other characteristics may be used as a proxy forthe identity of the country or region where the mains power supply isprovided in determining a maximum amount of power or current that may besafely drawn. For example, different countries and regions may providemains power supplies having various voltages and current levels.Accordingly, in these and other embodiments of the present invention,the characteristic that may be used as a proxy may be an amplitude, rootmean square (RMS) value, or other value of a parameter of the voltagewaveform of the mains power supply. An example is shown in the followingfigures.

FIG. 3 is a flowchart illustrating the operation of a power supplycircuit according to an embodiment of the present invention. A mainspower supply voltage may be received from a mains power supply in act310. This mains power supply may be received using a wall outlet, suchas a residential outlet, or other appropriate connection. This mainspower supply may be received by a power supply circuit or other circuit,which may be located in a computer system or other electronic device. AnRMS value of the received mains power supply voltage may be determinedin act 320. In these and other embodiments of the present invention,this value may be determined in various ways.

In act 330, once the RMS value of the mains power supply voltagewaveform has been determined, a maximum power or current that may bedrawn from the mains power supply may be determined. The maximum poweror current may be determined by, or received by, zone detectioncircuitry in or associated with the power supply circuit or computersystem. For example, depending on circuit implementation the zonedetection circuitry may determine whether the RMS value is above orbelow a specific level, or whether the RMS value is within one of anumber of ranges. Depending on the result, a maximum power or currentthat may be drawn by the computer system or other electronic device maybe determined. In act 340, output signals, such as power supply limits,clock signals, or other output signals may be provided to one or morecircuits and components in the computer system. These outputs maycontrol or adjust the power or current drawn by the computer system suchthat the maximum power or current is not exceeded. These one or morecircuits and components may include central processing units, graphicsprocessing units, and other circuits.

FIG. 4 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention. In this example, power may bereceived from a mains power supply via a wall outlet, such as aresidential outlet, or other connection at VIN. This voltage may beinductively coupled by transformer inductors L1 and L2 and provided to adiode bridge that includes diodes D1-D4. The diode bridge D1-D4 mayrectify the received power supply signal. The rectified voltage may befiltered by a capacitor or filter network, represented here by C1,resulting in the DC voltage V2. The voltage V2 may be received by powersupply control 220 in power supply circuit 210. Power supply control 220may control power regulator 230, which may provide an output voltage toother circuits (shown in FIG. 9) in a computer system or otherelectronic device housing power supply circuit 210.

The mains power supply VIN may also be received by RMS measurementcircuit 410 in power supply circuit 210. In these and other embodimentsof the present invention, RMS measurement circuit 410 may receive thevoltage V1 on the secondary side of the transformer L1-L2, it mayreceive V2, or it may receive another appropriate voltage. RMSmeasurement circuit 410 may determine RMS value of the mains powersupply voltage waveform VIN. For example, the RMS value may bedetermined by measuring a peak voltage of the mains power supply, thenmultiplying the measured peak voltage by the reciprocal of the squareroot of two (which is approximately 0.7071.) In these and otherembodiments of the present invention, the RMS value may be determined bymeasuring a peak-to-peak voltage of the mains power supply, thenmultiplying the measured peak-to-peak voltage by the reciprocal of twotimes the square root of two (which is approximately 0.3536.) In theseand other embodiments of the present invention, the RMS value may bedetermined by rectifying the mains power supply, measuring an average ofthe rectified mains power supply, then multiplying the measured averageby pi divided by the product of two times the square root of two (whichis approximately 1.11.) In these and other embodiments of the presentinvention, one or more of these different techniques may be employed.

Once the RMS value for the voltage waveform VIN has been measured, amaximum power or current that may be drawn from the mains power supplymay be determined. In this example, zone detection circuit 240 mayreceive the RMS measurement from RMS measurement circuit 410. Zonedetection circuit 240 may then determine whether the RMS value is aboveor below a specific level, or whether the RMS value is within one of anumber of ranges. Depending on the result, a maximum power or currentthat may be drawn by the computer system or other electronic device maybe determined.

In these and other embodiments of the present invention the maximumamount of power or current that may be drawn from a mains power supplymay be determined with various levels of specificity. For example, acountry or region may have a relatively low value for the power orcurrent that may be drawn from a mains power supply. Accordingly, anembodiment of the present invention may determine whether the mainspower supply is being provided in that country or region. If it is, thenthe maximum power or current draw may be set to the limits provided bythat country or region. If the mains power supply is provided in anothercountry or region, a higher value may be used as a limit for the maximumpower or current draw.

For example, Japan presently uses a mains power supply having a linevoltage of 101 volts with a 106 volt maximum, the maximum power draw is1200 watts, and the maximum current draw is 10 amps. The United Statespresently uses a mains power supply having a line voltage of 120 voltswith a 108 volt minimum, the maximum power draw is 1440 watts, and themaximum current draw is 12 amps. Accordingly, embodiments of the presentinvention may measure an RMS value of a mains power supply to determineif the 1200 watt or 1440 watt limit should be used. Specifically, RMSmeasurement circuit 410 may measure the RMS value of the mains powersupply. Since the maximum line voltage in Japan is 106 and the minimumline voltage in the United States is 108, zone detection circuit 240 maydetermine whether the RMS value is above or below 107 volts. If the RMSvalue is below 107 volts, zone detection circuit 240 may provideP-limits that set a maximum power draw for the computer system at 1200watts. If the RMS value is above 107 volts, zone detection circuit 240may provide P-limits that set a maximum power draw for the computersystem at 1440 watts. To be able to separate mains power supplies at 106and 108 volts, RMS measurement circuit 410 may have an accuracy of 0.5volts.

In another example, a country or region may have a relatively low valuefor the power that may be drawn from a mains power supply, another mayhave an intermediate value, while another may have a relatively highvalue. Accordingly, an embodiment of the present invention may determinewhether the mains power supply is being provided in a country or regionhaving the lower value, the intermediate value, or the higher value. Ifit is in a country or region having the lower value, then the maximumpower or current draw may be set to a lower limit, if it is in a countryor region having the intermediate value, the maximum power or currentdraw may be set to an intermediate limit, while if it is in a country orregion having a higher value, the maximum power or current draw may beset to a higher limit.

For example, in these and other embodiments of the present invention,zone detection circuit 240 may determine whether the RMS value measuredby RMS measurement circuit 410 is in one of three ranges. These rangesmay be from 90 to 107.5 volts, from 107.5 volts to 180 volts, or from180 to 240 volts, though these values may vary in these and otherembodiments of the present invention. Examples of countries in theseranges may be Japan, the United States, and Great Britain, respectively.Determination that the RMS value received from RMS measurement circuit410 is in one of these ranges may cause zone detection circuit 240 tolimit the maximum power draw of a computer system to 1000 watts, 1200watts, and 1440 watts respectively. These and other embodiments of thepresent invention may provide zone detection circuits 240 that determinea maximum power or current draw with even more specificity.

In these and other embodiments of the present invention, a high level ofa maximum power or current draw may be permitted in countries or regionshaving a mains power supply in the 220 volt range, while a lower levelof power may be permitted in a country or region having a mains powersupply in the 110 volt range. These and other embodiments of the presentinvention may provide zone detection circuits 240 that determine amaximum power or current draw with even more specificity.

In these and other embodiments of the present invention, once themaximum power or current draw has been determined, the power or currentdraw of the computer system may be limited in various ways such that themaximum power or current draw is not exceeded. For example, a voltageprovided to one or more circuits and components in the computer systemmay be varied to adjust the computer system power or current draw. Inthese and other embodiments of the present invention, a frequency of aclock signal provided to one or more circuits may be varied to adjustthe power or current draw. In these and other embodiments of the presentinvention, one or more outputs may be provided to one or more circuitsand components in the computer system. In the above example, P-limitsmay be provided to one or more circuits and components in the computersystem, where the P-limits may set a P-state of the one or more circuitsand components in the computer system. These P-limits may adjust powersupply voltages and clock frequencies provided to one or more circuitsor components. These P-limits may also cause the insertion of wait orinterrupt states that may be used to adjust the power draw of one ormore circuits or components. In these and other embodiments of thepresent invention, one or more circuits or components may be fully orpartially disabled in order to ensure that the maximum power or currentdraw is not exceeded. For example, they may be disabled using P-limits,by setting a state of one or more enable signals, by disconnecting orreducing one or more power supply voltages, by disabling one or moreclock signals, by varying one or more of these or other signals orvoltages provided to the one or more components, or by using othertechniques. The disabled circuits or components may be non-critical orredundant circuits or components. The circuits and components mayinclude one or more central processing units, graphics processing units,or other circuits or components. An example of such a computer system isshown in FIG. 9.

In these and other embodiments of the present invention, instead ofinferring a voltage region from a proxy, such as an RMS value, ageographic location where the mains power supply is being provided maybe determined. In these and other embodiments of the present invention,a determination of the geographic location of the computer system may bemore practical. An example is shown in the following figure.

FIG. 5 is a flowchart illustrating the operation of a power supplycircuit according to an embodiment of the present invention. In act 510,a mains power supply voltage may be received. This mains power supplymay be received from a wall outlet, such as a residential outlet, orother appropriate connection. This mains power supply may be received bya power supply circuit or other circuit, which may be in a computersystem or other type of electronic device. In act 520, a GPS circuit maybe powered by the received mains power supply, or other power supply,and may be used to determine a geographic location of the computersystem.

Based on the geographic location, a maximum power or current that may bedrawn may be determined in act 530. Again, this geographic location maybe in a geographical or political country, region, or territory, whereregulations, building codes, or other limits may specify a maximumamount of power or current that may be drawn from the local mains powersupply. These regulations, building codes, or other limits may be usedin determining the maximum power or current may be drawn. In act 540,output signals, such as power supply limits, clock signals, or otheroutput signals may be provided to one or more circuits or components inthe computer system. These outputs may control or adjust power orcurrent drawn by the circuits and components such that the maximum poweror current is not exceeded. These one or more circuits may includecentral processing units, graphics processing units, and other circuitsor components.

FIG. 6 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention. In this example, power may bereceived from a mains power supply via a wall outlet, such as aresidential outlet, or other connection at VIN. This voltage may beinductively coupled though a transformer including inductors L1 and L2and provided to a diode bridge that includes diodes D1-D4. The diodebridge D1-D4 may rectify the received mains power supply signal. Therectified voltage may be filtered by a capacitor or filter network,represented here by C1, resulting in the DC voltage V2. The voltage V2may be received by power supply control 220 in power supply circuit 210.Power supply control 220 may control power regulator 230, which mayprovide an output voltage VOUT to other circuits or components (shown inFIG. 9) in a computer system or other electronic device housing thispower supply circuit.

GPS 610 in or associated with power supply circuit 210 may be powered bythis or another output voltage. GPS 610 may determine the geographiclocation of the computer system or other electronic device housing powersupply circuit 210. Based on the geographic location, zone detectioncircuit 240 may provide one or more outputs, such as P-limits to othercircuits in the computer system. In these and other embodiments of thepresent invention, zone detection circuit 240 may include look-up tablesto receive a geographic location and provide a maximum power or currentthat may be drawn. In these and other embodiments of the presentinvention, zone detection circuit 240 may access information storedexternally, for example over the internet. This external information maybe used with, or instead of, information stored locally in look-uptables. Zone detection circuit 240 may provide one or more outputs, suchas P-limits, to other circuits or components in the computer system.These P-limits or other outputs may adjust or control the power orcurrent drawn by the circuits or components such that a maximum power orcurrent is not exceeded. The circuits and components may include one ormore central processing units, graphics processing units, or othercircuits or components (as shown in FIG. 9.)

In these and other embodiments of the present invention, the geographiclocation, or the actual identity of the country or region, where themains power supply is being provided may be determined by asking a useror by retrieving location information from a second device, such as asmartphone or other portable computing device. In these and otherembodiments of the present invention, other methods, such as using localcellular service, Wi-Fi mapping, or broadcast signals may be used indetermining a location where the mains power supply is being provided.In these and other embodiments of the present invention, one or more ofthese and other techniques may be combined or used as verification ofeach other. For example, an RMS value for a mains power supply voltagewaveform may be used as a primary indicator, while a GPS measurement, anindication from a second device, local cellular service, Wi-Fi mapping,or broadcast signals may be used as confirmation. In the event thatdifferent sources provide different results, the computer system orother electronic device may draw the lowest power or current level ofthose indicated by the results, or the computer system may default to alowest power or current level.

In these and other embodiments of the present invention, otherconsiderations may be taken into account in determining a maximum amountof power or current that may be drawn from a mains power supply. Forexample, in these and other embodiments of the present invention, whenthe location of a mains power supply is uncertain (for example due toinconsistent RMS or GPS readings), the computer system may default todrawing the lowest, or a lower, power or current level. In these andother embodiments of the present invention, when an RMS value of themains supply is uncertain, the computer system may default to drawingthe lowest, or a lower, power or current level. These and otherembodiments of the present invention may include a circuit to determinethe quality of a received mains power supply. For example, a consistencyof RMS measurements may be determined. Also, where different methods areused to calculate RMS, the consistency between these methods may bedetermined. If the presence of noise or power supply variation resultsin inconsistent measurements of an RMS voltage, the computer system maydefault to drawing the lowest, or a lower, power or current level. Anexample is shown in the following figures.

FIG. 7 is a flowchart illustrating the operation of a power supplycircuit according to an embodiment of the present invention. In act 710,a mains power supply voltage may be received. This mains power supplymay be received from a wall outlet, such as a residential outlet, orother appropriate connection. This mains power supply may be received bya power supply circuit or other circuit, which may be located in acomputer system or other electronic device. In act 720, an RMS value andquality of the mains power supply voltage may be determined. In act 730,it may be determined whether the quality of the mains power supply issufficient. For example, the mains power supply may have excessiveamplitude or phase noise, inconsistencies in amplitude, or othercharacteristics that may indicate it has a poor quality. If the qualityof the mains power supply is poor, the permissible maximum power orcurrent draw may be set to a lower value in act 740. In act 750,outputs, such as P-limits, may be provided to circuits or components inthe computer system or other electronic device based on this reducedcurrent draw.

If the quality or the mains power supply is sufficient in act 730, acurrent draw based on the RMS value may be determined in act 760. In act770, outputs, such as P-limits, may be provided to circuits orcomponents in the computer system based on the RMS value, where theP-limits control or adjust power or current drawn by the circuits orcomponents to ensure that the maximum power or current is not exceeded.

FIG. 8 is a simplified block diagram of power supply circuitry accordingto an embodiment of the present invention. In this example, power may bereceived from a mains power supply via a wall outlet, such as aresidential outlet, or other connection at VIN. This voltage may beinductively coupled through transformer inductors L1 and L2 and providedto a diode bridge that includes diodes D1-D4. The diode bridge D1-D4 mayrectify the received power supply signal. The rectified voltage may befiltered by a capacitor or filter network, represented here by C1,resulting in the DC voltage V2. The voltage V2 may be received by powersupply control 220 in power supply circuit 210. Power supply control 220may control power regulator 230, which may provide an output voltageVOUT to other circuits (shown in FIG. 9) in a computer system or otherelectronic device housing this power supply circuit.

The mains power supply VIN may be received by RMS measurement circuit410 in power supply circuit 210. RMS measurement circuit 410 maydetermine RMS value of the voltage waveform VIN as shown above. In theseand other embodiments of the present invention, RMS measurement circuit410 may receive the voltage V1 on the secondary side of the transformerL1-L2, the filtered voltage V2, or other appropriate voltage.

The mains power supply voltage VIN may also be received by qualitymeasurement circuit 810. Quality measurement circuit 810 may determine aquality of the mains power supply voltage VIN. For example, the mainspower supply voltage waveform may have excessive amplitude or phasenoise, inconsistencies in amplitude, or other characteristics that mayindicate it is of a poor signal quality. In these and other embodimentsof the present invention, RMS measurement circuit 410 may take a numberof samples of the mains power supply voltage waveform at power up, andthen average them. For example, 5, 8, 10, 20, or other numbers ofsamples may be taken and averaged. These samples may also be examinedfor consistency and this information may be used in determining thequality of the mains power supply. If the quality is not sufficient,zone detection circuit 240 may provide P-limits or other outputs basedon a reduced maximum power or current draw.

If the quality or the mains power supply is sufficient, a power orcurrent draw based on the RMS value may be determined by zone detectioncircuit 240. Zone detection circuit 240 may provide outputs, such asP-limits, to circuits or components in the computer system or other theelectronic device based on the RMS value. The circuits and componentsmay include one or more central processing units, graphics processingunits, or other circuits or components (as shown in FIG. 9.) Zonedetection circuit 240 may determine whether the RMS value is above orbelow a certain level, or within one of a number of ranges, as shownabove.

FIG. 9 is a simplified block diagram of a computer system according toan embodiment of the present invention. While the power supply circuit210 of FIG. 2 is shown, the power supply circuits in the other examplesand in other embodiments of the present invention may be used. In thisexample, power may be received from a mains power supply via a walloutlet, such as a residential outlet, or other connection at input VIN.The voltage VIN may be rectified and filtered and provided to powersupply control 220 in power supply circuit 210. Power supply control 220may control power regulator 230, which may provide an output voltageVOUT to circuits or components in the computer system, in this exampleCPU 910 and GPUs 920, 922, and 924, which may be collectively referredto as components 950. In these and other embodiments of the presentinvention, other circuits or components or other numbers of thesecircuits or components may be included in the computer system, and oneor more of these components may be omitted. In this example, graphicsbus 980 may be used by GPUs 920, 922, and 924 to provide graphics data amemory or display (not shown.)

The mains power supply VIN may be received by zone detection circuit 240in power supply circuit 210. Zone detection circuit 240 may determineone or more characteristics of the mains power supply VIN, and from thatdetermination may set a maximum power or current draw by providing oneor more outputs to components 950.

More specifically, in these and other embodiments of the presentinvention, once the maximum power or current draw has been determined,the power or current draw of the computer system may be limited invarious ways such that the maximum power or current draw is notexceeded. For example, the voltage VOUT provided to components 950 inthe computer system may be varied to adjust the computer system power orcurrent draw. In these and other embodiments of the present invention, afrequency of a clock signal (not shown) provided to components 950 maybe varied to adjust the power or current draw. In these and otherembodiments of the present invention, one or more outputs may beprovided to components 950 in the computer system. In the above example,P-limits may be provided to components 950 in the computer system. Theseoutputs or P-limits may set a P-state of components 950. These P-limitsmay adjust power supply voltages and clock frequencies provided tocomponents 950. These P-limits may also cause the insertion of wait orinterrupt states that may be used to adjust the power or current draw ofcomponents 950. In these and other embodiments of the present invention,one or more components 950 may be fully or partially disabled in orderto ensure that the maximum power or current draw is not exceeded. Forexample, components 950 may be disabled using P-limits, by setting astate of one or more enable signals, by disconnecting or reducing one ormore power supply voltages, by disabling one or more clock signals, byvarying one or more of these or other signals or voltages provided tocomponents 950, or by using other techniques. The disabled components950 may be non-critical or redundant components.

When a mains power supply is used to power this computer system, currentmay flow through power conduits, an outlet or socket, a power cord intothe computer system, and through connections in the computer system.Each of the elements of this path may have a resistance. The currentflowing into the computer system through these resistances may createvoltage drops. These voltage drops may reduce an amplitude of thereceived mains power supply, making RMS measurements inaccurate. Also,changes in the current may cause noise on the received mains powersupply, thereby reducing the apparent quality of the mains power supply.Accordingly, embodiments of the present invention may provide auxiliarypower supply control 940 and auxiliary power regulator 942. Auxiliarypower supply control 940 and auxiliary power regulator 942 may providepower to zone detection circuit 240 (and to other circuits, such as RMSmeasurement circuit 410 and quality measurement circuit 810, when theyare included.) The residual voltage drops caused by powering zonedetection circuit 240 may be calibrated to further reduce errors. Powerfor components 950 may be withheld until the maximum power or currentthat may be drawn is determined. Once a power profile including themaximum power or current has been generated, the main power supply maybe activated and power may be delivered to components 950.

In these and other embodiments of the present invention, an RMS value orgeographic location of the mains power supply may be determined atvarious times. For example, RMS measurements may be made on power-up, orwhen various reset events occur. Geographic locations may be determinedon power up, or when various reset events occur. In these and otherembodiments of the present invention, RMS measurement circuit 410 (shownin FIG. 4) may take a number of samples of the mains power supplyvoltage waveform at power up, and then average them. For example, 5, 8,10, 20, or other numbers of samples may be taken and averaged. Thesesamples may also be examined for consistency and this information may beused in determining a quality of the mains power supply, as describedabove.

In these and other embodiments of the present invention, RMS or locationmeasurements may be performed in real-time, or in a near real-timebasis, while the maximum power or current draw may be updatedcontinuously, or on an occasional or regular basis. In these and otherembodiments of the present invention, RMS and quality measurements maybe performed in real-time, or in a near real-time basis, the maximumpower or current draw may be updated continuously, or on an occasionalor regular basis. The consistency of these measurements may be used indetermining a quality of the mains power supply.

The present disclosure recognizes that the use of location informationcan be to the benefit of users. For example, the location is used todeliver power efficiently. It is contemplated that entities responsiblefor collecting and using this location data will comply withwell-established privacy policies and/or privacy practices. Inparticular, such entities should implement and consistently use privacypolicies and practices that are generally recognized as meeting orexceeding industry or governmental requirements for maintaining suchdata private and secure. Such policies should be easily accessible byusers, and should be updated as the collection and/or use of datachanges. Additionally, such entities should consider taking any neededsteps for safeguarding and securing access to such personal informationdata and ensuring that others with access to the personal informationdata adhere to their privacy policies and procedures. Further, suchentities can subject themselves to evaluation by third parties tocertify their adherence to widely accepted privacy policies andpractices. In addition, policies and practices should be adapted toapplicable laws and standards, including jurisdiction-specificconsiderations.

Despite the foregoing, the present disclosure also contemplatesembodiments in which users selectively block the use of, or access to,location data. For example, the present technology can be configured toallow users to select to “opt in” or “opt out” of participation toeffective turn on or turn off voltage sensing. In addition to providing“opt in” and “opt out” options, the present disclosure contemplatesproviding notifications relating to the access or use of location data.For instance, a user may be notified upon initial configuration of theirpersonal computer that location information may be used to determinepower supply configuration.

Moreover, it is the intent of the present disclosure that locationinformation data should be managed and handled in a way to minimizerisks of unintentional or unauthorized access or use. Risk can beminimized by limiting the collection of data and deleting data once itis no longer needed. In addition, and when applicable, datade-identification can be used to protect a user's privacy.De-identification may be facilitated, when appropriate, by removingspecific identifiers (e.g., street numbers), controlling the amount orspecificity of data stored (e.g., collecting location data a city levelrather than at an address level), controlling how data is stored, and/orother methods.

These and other embodiments of the present invention may provide powersupply circuitry and apparatus that may be located in various types ofdevices, such as desktop computing devices, computer systems, servers,modular computing devices, all-in-one computers, and other devices.

The above description of embodiments of the invention has been presentedfor the purposes of illustration and description. It is not intended tobe exhaustive or to limit the invention to the precise form described,and many modifications and variations are possible in light of theteaching above. The embodiments were chosen and described in order tobest explain the principles of the invention and its practicalapplications to thereby enable others skilled in the art to best utilizethe invention in various embodiments and with various modifications asare suited to the particular use contemplated. Thus, it will beappreciated that the invention is intended to cover all modificationsand equivalents within the scope of the following claims.

What is claimed is:
 1. A power supply circuit comprising: power supplycircuitry to receive a mains power supply from an outlet, to generate aregulated power supply, and to provide the regulated power supply to afirst circuit, the first circuit external to the power supply circuit;and a detection circuit to receive the mains power supply and todetermine a characteristic of the mains power supply, and responsive tothe determined characteristic, to provide an output signal to the firstcircuit, wherein after the determination of the characteristic, theregulated power supply is provided to the first circuit by the powersupply circuitry, the first circuit receives the output signal from thedetection circuit, and responsive to the output signal from thedetection circuit, the first circuit adjusts a power drawn from theregulated power supply by the first circuit, and wherein power is notprovided to the first circuit whenever the detection circuit determinesthe characteristic of the mains power supply.
 2. The power supplycircuit of claim 1 wherein the characteristic is a root mean square ofthe mains power supply voltage.
 3. The power supply circuit of claim 1wherein the detection circuit comprises a root mean square measurementcircuit.
 4. The power supply circuit of claim 1 wherein thecharacteristic is a location and the detection circuit comprises aglobal-positioning system.
 5. The power supply circuit of claim 2wherein the output signal comprises a command to set a P-state of thefirst circuit.
 6. The power supply circuit of claim 5 wherein the outputsignal comprises a P-limit to set a P-state of the first circuit.
 7. Thepower supply circuit of claim 6 wherein the first circuit comprises agraphics processing unit.
 8. The power supply circuit of claim 6 whereinthe first circuit comprises a plurality of graphics processing units. 9.The power supply circuit of claim 1 wherein the first circuit adjuststhe power drawn from the regulated power supply by the first circuitwhile the first circuit receives the regulated power supply and aground.
 10. A computer system comprising: power supply circuitry toreceive a mains power supply from an outlet, to generate a regulatedpower supply, and to provide the regulated power supply; a graphicsprocessing unit to receive the regulated power supply; and a detectioncircuit to determine a root mean square (RMS) value of the mains powersupply voltage, and responsive to the RMS value, to determine power-sinklimits and to provide the power-sink limits to the graphics processingunit, wherein responsive to the power-sink limits from the detectioncircuit, the graphics processing unit adjusts a power drawn from theregulated power supply by the graphics processing unit while thegraphics processing unit receives the regulated power supply and aground, and wherein power is not provided to the graphics processingunit while the detection circuit determines the RMS value used todetermine the power-sink limits.
 11. The computer system of claim 10wherein the detection circuit comprises a root mean square measurementcircuit.
 12. The computer system of claim 11 wherein the detectioncircuit further comprises a zone detection circuit to determine amaximum power draw from the mains power supply based on the RMS value ofthe mains power supply voltage.
 13. The computer system of claim 10wherein the power supply circuitry further comprises aglobal-positioning system.
 14. The computer system of claim 12 whereinthe power-sink limits set a P-state of the graphics processing unit. 15.The computer system of claim 12 wherein the power-sink limits adjustpower supply voltages and clock frequencies in the graphics processingunit.
 16. The computer system of claim 12 wherein the computer systemfurther comprises a central processing unit, and wherein the detectioncircuit further provides power-sink limits to the central processingunit.
 17. A computer system comprising: power supply circuitry toreceive a mains power supply from an outlet, to generate a regulatedpower supply, and to provide the regulated power supply; a graphicsprocessing unit to receive the regulated power supply; a qualitymeasurement circuit to determine a quality of the mains power supplyreceived by the power supply circuitry and to provide an output signalwhen the quality is below a first level, wherein the quality is based ona consistency among a plurality of measurements of the root mean squareof the mains power supply voltage; and a detection circuit to receivethe output signal from the quality measurement circuit and to determinea characteristic of the mains power supply, and responsive to the outputsignal and to the determined characteristic, to determine power-sinklimits and to provide the power-sink limits to the graphics processingunit, wherein responsive to the power-sink limits from the detectioncircuit, the graphics processing unit adjusts a power drawn from theregulated power supply by the graphics processing unit, and whereinpower is not provided to the graphics processing unit while thedetection circuit determines the characteristic used to determine thepower-sink limits.
 18. The computer system of claim 17 wherein thedetection circuit comprises a root mean square measurement circuit toprovide a value of the root mean square of the mains power supplyvoltage.
 19. The computer system of claim 18 wherein the detectioncircuit further comprises a zone detection circuit to determine amaximum power draw from the mains power supply based on the value of theroot mean square of the mains power supply voltage.
 20. The computersystem of claim 17 wherein the detection circuit comprises aglobal-positioning system.
 21. The computer system of claim 17 whereinthe power-sink limits adjust power supply voltages and clock frequenciesin the graphics processing unit.
 22. The computer system of claim 17wherein the graphics processing unit adjusts the power drawn from theregulated power supply by the graphics processing unit while thegraphics processing unit receives the regulated power supply and aground.